package br.edu.utfpr.backuptools.BackupTools.rmi;

import java.net.MalformedURLException;
import java.rmi.Naming;
import java.rmi.NotBoundException;
import java.rmi.RemoteException;

import br.edu.utfpr.comum.RmiProvider;

public class RmiCliente{
	public RmiProvider play() throws RemoteException {
		
		try {
            RmiProvider provider = (RmiProvider) Naming.lookup("rmi://localhost:1099/BackupToolsService");
            
            provider.vai("estou vindo do cliente");
            return provider;
		} catch (NotBoundException e) {
			e.printStackTrace();
			return null;
		} catch (MalformedURLException e) {
			e.printStackTrace();
			return null;
		}

}
}
